import { AuthToken } from '@/utils/Constent'
import Storage from '@/utils/Storage'

export const getTokenTimeout = () => {
  return Storage.getLocal(AuthToken.TOKEN_TIMEOUT_KEY)
}

export const setTokenTimeout = () => {
  Storage.setLocal(AuthToken.TOKEN_TIMEOUT_KEY, Date.now())
}

export const differentTime = () => {
  return Date.now() - getTokenTimeout() > AuthToken.TOKEN_TIMEOUT_DURATION
}
